package cn.shujuhai.cms.domain;


import cn.shujuhai.common.domain.BaseDomain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * @TableName group
 */
@EqualsAndHashCode(callSuper = true)
@TableName(value = "group_info")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Group extends BaseDomain {
    /**
     * 分组ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 分组名称
     */
    @NotNull(message = "分组名称不能为空")
    @Size(min = 1, max = 20, message = "分组名必须在1～20之间")
    private String groupName;

    /**
     * 分组描述
     */
    private String description;

}